﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using Newtonsoft.Json;
using VNSSystem.Controllers.Security;

namespace VNSCMS.Controllers
{
    public class HomeController : BaseController
    {
        public async Task<ActionResult> Index()
        {
            var client = new HttpClient();
            client.BaseAddress = BaseUri;
            client.DefaultRequestHeaders.Accept.Clear();
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));                        
            var response = await client.GetAsync("/api/v1/MenuDescription");
            var content = JsonConvert.DeserializeObject<abc>(response.Content.ReadAsStringAsync().Result);
            return View();
        }
    }

    public class abc
    {
        public string Name { get; set; }
    }
}